{{--左侧菜单栏模板--}}


<div class="admin-sidebar am-offcanvas" id="admin-offcanvas">
    <div class="am-offcanvas-bar admin-offcanvas-bar">
        <ul class="am-list admin-sidebar-list">
            <li><a href="javascript:;"
                   onclick="toggle({{$home->id}})">
                    <span class="am-icon-home"></span>
                    {{$home->name}}
                </a>
                @if(count($homeSubs))
                    {{--<ul class="am-list am-collapse admin-sidebar-sub am-in" --}}
                    <ul class="am-list am-collapse admin-sidebar-sub am-out"
                        id="collapse-nav{{$home->id}}">
                        @foreach($homeSubs as $sub)
                            <li><a href="{{ADMIN_DOMAIN.$sub->url}}"
                                   lass="am-cf" title="{{$sub->name}}">
                                    {{--<span class="am-icon-check"></span>--}}
                                    <span class="am-icon-table"></span>
                                    {{mb_strlen($sub->name)<6 ? $sub->name : mb_substr($sub->name,0,5).'...'}}
                                    <span class="am-icon-star am-fr am-margin-right admin-icon-yellow"></span>
                                </a></li>
                        @endforeach
                    </ul>
                @endif
            </li>

            @foreach($leftMenus as $leftMenu)
            <li class="admin-parent">
                <a class="am-cf" data-am-collapse="{target: '#collapse-nav'}"
                   title="{{$leftMenu->name}}"
                   onclick="toggle({{$leftMenu->id}})"
                >
                    <span class="am-icon-file"></span>
                    {{mb_strlen($leftMenu->name)<8 ? $leftMenu->name : mb_substr($leftMenu->name,0,7).'...'}}
                    {{--<span class="am-icon-angle-right am-fr am-margin-right"></span>--}}
                </a>
                @if($leftMenu->subs)
                {{--<ul class="am-list am-collapse admin-sidebar-sub am-in" --}}
                <ul class="am-list am-collapse admin-sidebar-sub am-out"
                    id="collapse-nav{{$leftMenu->id}}">
                    @foreach($leftMenu->subs as $sub)
                    <li><a href="{{ADMIN_DOMAIN.$sub->url}}"
                           lass="am-cf" title="{{$sub->name}}">
                            {{--<span class="am-icon-check"></span>--}}
                            <span class="am-icon-table"></span>
                            {{mb_strlen($sub->name)<6 ? $sub->name : mb_substr($sub->name,0,5).'...'}}
                            <span class="am-icon-star am-fr am-margin-right admin-icon-yellow"></span>
                        </a></li>
                    @endforeach
                </ul>
                @endif
            </li>
            @endforeach
        </ul>

        <div class="am-panel am-panel-default admin-sidebar-panel">
            <div class="am-panel-bd">
                <p>
                    <span class="am-icon-bookmark"></span>
                    平台
                </p>
                <p>美策平台管理中心</p>
            </div>
        </div>

        <div class="am-panel am-panel-default admin-sidebar-panel">
            <div class="am-panel-bd">
                <p>
                    <span class="am-icon-bookmark"></span>
                    文档汇总
                </p>
                <p><a href="http://amazeui.org/javascript/modal" target="_blank">模板文档查阅</a>
                </p>
                <p><a href="https://lanhuapp.com/web/#/item/project/board?pid=b12d8e28-c4b4-472c-a492-90d7a3fb752d"
                      target="_blank">蓝湖UI</a>
                </p>
                {{--<p><a href="http://naotu.baidu.com/file/f36a392342360dd532a5913d90ded273?token=e4a7a045e041a723"--}}
                      {{--target="_blank">数据表</a>--}}
                    {{--&nbsp; &nbsp;--}}
                    {{--<a href="http://naotu.baidu.com/file/a7347a532c317f8fd16e31292c996de3?token=1809ba44538a89b5" target="_blank">APP数据接口</a>--}}
                {{--</p>--}}
                <p><a href="https://www.yuque.com/docs/share/5edfaba0-1da9-463b-b6a3-49f471430fbe"
                      target="_blank">接口文档</a>
                </p>
                <p><a href="https://www.yuque.com/docs/share/cc766b50-e224-40fa-8e62-84351f03f161"
                      target="_blank">数据表</a>
                </p>
                <p>
                    <a href="https://gitee.com/hangzhou_mei_ce_network/fzcgx" target="_blank">码云源码</a>
                </p>
            </div>
        </div>
    </div>
</div>


<script>
    function toggle(id){ $("#collapse-nav"+id).toggle(200); }
</script>